cc.Class({
    extends: cc.Component,

    properties: {
        //小星星绕太阳转一圈需要时间(秒)
        oneTurnTime: 12
    },

    setRotateAction: function () {
        let rorate = cc.rotateBy(this.oneTurnTime, 360);
        return cc.repeatForever(rorate);
    },

    // LIFE-CYCLE CALLBACKS:
    onLoad() {
        const _self = this;

        this.rotateAction = this.setRotateAction();
        this.node.runAction(this.rotateAction);

        this.node.on(cc.Node.EventType.TOUCH_START, function () {
            _self.node.stopAction(_self.rotateAction);
        });

        this.node.on(cc.Node.EventType.TOUCH_END, function () {
            _self.node.runAction(_self.rotateAction);
        })
    },

    start() {

    },

    update(dt) {},
});